<?php
$str=file_get_contents('http://cn.bing.com/HPImageArchive.aspx?idx=0&n=1');
	if(preg_match("/<url>(.+?)<\/url>/ies",$str,$matches)){
		$url='http://cn.bing.com'.$matches[1];}
date_default_timezone_set("Asia/Shanghai");
$fp_input = fopen($url, 'r');
file_put_contents('./img/'.date("Y-m-d").'.jpg', $fp_input);
exec("libreoffice ./img/".date("Y-m-d").".jpg", $out, $status);

?> 